package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.FragmentScope;
import com.wgts.wgts.mvp.model.IinvitationRecordFragmentModel;
import com.wgts.wgts.mvp.model.imp.InvitationRecordFragmentModel;
import com.wgts.wgts.mvp.presenter.IinvitationRecordFragmentPresenter;
import com.wgts.wgts.mvp.presenter.imp.InvitationRecordFragmentPresenter;
import com.wgts.wgts.mvp.view.IinvitationRecordFragmentView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class InvitationRecordFragmentModule {

    private IinvitationRecordFragmentView view;

    public InvitationRecordFragmentModule(IinvitationRecordFragmentView view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    public IinvitationRecordFragmentView provideView(){
        return view;
    }

    @FragmentScope
    @Provides
    public IinvitationRecordFragmentModel provideModel(NetService netService){
        return new InvitationRecordFragmentModel(netService);
    }

    @FragmentScope
    @Provides
    public IinvitationRecordFragmentPresenter providePersenter(IinvitationRecordFragmentModel model, IinvitationRecordFragmentView view){
        return new InvitationRecordFragmentPresenter(model, view);
    }
}
